<?php

/**
 * @desc ajax admin page
 * @version $Id: 20120122
 * @author n0aX
 * @package Administration
 */

$admin_request = $tk->page->_pv['admin_request'];
$admin_page = $tk->page->_pv['admin_page'];

switch($admin_request)
{
	case 'edit':
		$sql = sprintf("SELECT $item_fields from $item_table WHERE user_id = '%d'",(int) $req['get']['id']);
		
		
		if(!($result = $tk->db->sql_query($sql)))
		{
			$error = 'sql';
			$tk->eh->message_die($error, __LINE__, __FILE__, $sql);
			return;
		}
		$tk->page->request = 'inner-html';
		$data = $tk->db->sql_fetchrow($result);
		
		break;
	case 'delete':
		break;
	default:
		break;
}
